package urban_seed_cn

import (
	"fmt"
	"gitee.com/theegg/go-brick/app/model/urban/urban_elements"
	"gitee.com/theegg/go-brick/app/service/app"
)

// 景点  seed
func InitPartnerTourElementsSeed() {

	items := make(map[int]urban_elements.UrbanElements)

	items[1100001] = urban_elements.UrbanElements{
		Id:          1100001,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "千佛山",
		TitleEn:   "Qianfo Mount",
		TypeId:    1,
		TypeSubId: 1003,
		Summary:   "济南三大名胜之一，古称历山，因为古史称舜在历山耕田的缘故，又曾名舜山和舜耕山。隋开皇年间（581年一600年），因佛教盛行，随山势雕刻了数千佛像，故称千佛山",
		Content:   "",

		OpenTime:    "08:00",
		CloseTime:   "17:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "历史悠久,佛教,闹中取静",
		FeeTicketHas: true,
		FeeInnerHas:  false,
		FeeAmount:    "30元",

		Country:    "cn",
		ProvinceId: 2001,
		CityId:     2001001,
		Address:    "山东省济南市历下区经十一路18号",

		CoordinateX: "13029273.25085",
		CoordinateY: "4364243.494715",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[1100002] = urban_elements.UrbanElements{
		Id:          1100002,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "八仙渡",
		TitleEn:   "Baxiandu",
		TypeId:    1,
		TypeSubId: 1005,
		Summary:   "位于海水浴场东侧海中，西与蓬莱遥遥相望的八仙渡海口，是根据八仙过海神话传说填海新建的景区，填海面积3.3万平方米，如果从空中俯视恰似丫腰葫芦一般",
		Content:   "",

		OpenTime:    "08:00",
		CloseTime:   "17:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "天高水阔,虚幻缥缈,闹中取静",
		FeeTicketHas: true,
		FeeInnerHas:  false,
		FeeAmount:    "80元",

		Country:    "cn",
		ProvinceId: 2001,
		CityId:     2001003,
		Address:    "山东烟台蓬莱市海滨路8号",

		CoordinateX: "13445653.14",
		CoordinateY: "4528978.8",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[1100003] = urban_elements.UrbanElements{
		Id:          1100003,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "南京夫子庙",
		TitleEn:   "The Confucian Temple",
		TypeId:    1,
		TypeSubId: 1004,
		Summary:   "南京夫子庙位于南京市秦淮区秦淮河北岸贡院街、江南贡院以西，地处夫子庙秦淮风光带核心区，即南京孔庙、南京文庙、文宣王庙，为供奉祭祀孔子之地，是中国第一所国家最高学府、中国四大文庙之一",
		Content:   "",

		OpenTime:    "08:00",
		CloseTime:   "17:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "天高水阔,虚幻缥缈,闹中取静",
		FeeTicketHas: false,
		FeeInnerHas:  true,
		FeeAmount:    "",

		Country:    "cn",
		ProvinceId: 2002,
		CityId:     2002001,
		Address:    "南京市秦淮区",

		CoordinateX: "13224275.088",
		CoordinateY: "3743988.779245",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[1100004] = urban_elements.UrbanElements{
		Id:          1100004,
		PartnerSign: "default",
		Lang:        "cn",

		Title:     "虎丘山风景名胜区",
		TitleEn:   "Huqiu mountain scenic spot",
		TypeId:    1,
		TypeSubId: 1015,
		Summary:   "虎丘山风景名胜区位于苏州古城西北角的虎丘山风景名胜区，有2500多年的悠久历史，有“吴中第一名胜”、“吴中第一山”的美誉，宋代大诗人苏东坡写下“尝言过姑苏不游虎丘，不谒闾丘，乃二欠事”的千古名言",
		Content:   "",

		OpenTime:    "07:30",
		CloseTime:   "17:30",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "吴中第一山,云岩寺塔,闹中取静",
		FeeTicketHas: false,
		FeeInnerHas:  true,
		FeeAmount:    "",

		Country:    "cn",
		ProvinceId: 2002,
		CityId:     2002002,
		Address:    "江苏省苏州市姑苏区山门内八号",

		CoordinateX: "13224275.088",
		CoordinateY: "3743988.779245",
		PlusCode:    "",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	count := 0
	errCount := 0
	for _, item := range items {
		_, err := app.Db().Insert(item)
		if err != nil {
			fmt.Println(err.Error())
			errCount++
		} else {
			count++
		}
	}

	fmt.Printf("%5s|%25s|%10d|%8d|\n", "", "urban_elements", count, errCount)
}
